/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package as.internal;

/**
 *
 * @author David
 */
public class TabletStatus {
	public int x, y, button, orientation, angle, pressure, cursor;

	public int scaleX(int maxWidth) {
		int ratio = TabletProperties.tabletWidth/maxWidth;
		return x/ratio;
	}

	public int scaleY(int maxHeight) {
		int ratio = TabletProperties.tabletHeight/maxHeight;
		return y/ratio;
	}
	
	public int invertScaleX(int maxWidth) {
		int ratio = TabletProperties.tabletWidth/maxWidth;
		return (TabletProperties.tabletWidth-x)/ratio;
	}

	public int invertScaleY(int maxHeight) {
		int ratio = TabletProperties.tabletHeight/maxHeight;
		return (TabletProperties.tabletHeight-y)/ratio;
	}
}
